package com.isoft.data.dao;

import com.isoft.data.xml.Poke;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PokeDao {
    @Insert("insert into META(SNDR,RCVR,SEQN,DDTM,TYPE,STYP)" +
            "values(#{poke.meta.sndr},#{poke.meta.rcvr},"+
            "#{poke.meta.seqn},#{poke.meta.ddtm},"+
            "#{poke.meta.type},#{poke.meta.styp})")
    public int addMETA(@Param("poke") Poke poke);
    
    @Insert("insert into POKE(SEQN,DDTM,FLID,FFID,FIDE,FATT,STAT,ISTA,POKT,MSTA,MIST,MPOK) " +
            "values(#{poke.meta.seqn},#{poke.meta.ddtm},#{poke.dflt.flid},#{poke.dflt.ffid},#{poke.dflt.fide}," +
            "#{poke.dflt.fatt},#{poke.dflt.stat},#{poke.dflt.ista},#{poke.dflt.pokt}" +
            ",#{poke.dflt.msta},#{poke.dflt.mist},#{poke.dflt.mpok})")
    public int addPoke(@Param("poke")Poke poke);
}
